package android.src.main.km_printer_plugin.manager;

import android.os.Handler;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

public class ThreadPoolManager {

    private ThreadPoolManager() {
        cachedThreadPool = Executors.newCachedThreadPool();
    }

    // 线程
    ExecutorService cachedThreadPool;

    public ExecutorService getCachedThreadPool() {
        return cachedThreadPool;
    }

    // 单例
    private static final ThreadPoolManager instance = new ThreadPoolManager();

    public static ThreadPoolManager getInstance() {
        return instance;
    }

    //
    private final Handler handler = new Handler();

    public Handler getHandler() {
        return handler;
    }

}
